package com.cpecc.model.wuzi;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.cpecc.model.system.User;

@Entity
@Table(name = "DATA_BAOFEI_USER")
public class BaoFeiSPR implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4542666119243929043L;

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(length = 32)
	private String id;
	
	@ManyToOne
	@JoinColumn(name="BAOFEI_ID")
	private BaoFei baoFei;
	
	@ManyToOne
	@JoinColumn(name="USER_ID")
	private User user;
	
	@Column
	private int no;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public BaoFei getBaoFei() {
		return baoFei;
	}

	public void setBaoFei(BaoFei baoFei) {
		this.baoFei = baoFei;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public int getNo() {
		return no;
	}

	public void setNo(int no) {
		this.no = no;
	}

	public BaoFeiSPR(String id, BaoFei baoFei, User user, int no) {
		super();
		this.id = id;
		this.baoFei = baoFei;
		this.user = user;
		this.no = no;
	}

	public BaoFeiSPR() {
		super();
	}	
}
